home *** CD-ROM | disk | FTP | other *** search
- on InitPhoneValueMeter
- global gValueMeterL, gVM_variableL, gCityDB, gTowns, gNotAnswYet
- set gNotAnswYet to 1
- set currency to getAt(getAt(gCityDB, PICDB(getAt(gTowns, 1))), 6)
- set exchangefactor to getAt(getAt(gCityDB, PICDB(getAt(gTowns, 1))), 7)
- set max to 4000.0 / exchangefactor
- set Step to max / 100
- set max to integer(max)
- set gVM_variableL to [currency, 0, 1, max, Step, max / 2]
- set K to getAt(gVM_variableL, 3)
- set VMin to value(K)
- set K to getAt(gVM_variableL, 4)
- set VMax to value(K)
- set K to getAt(gVM_variableL, 5)
- set Step to value(K)
- set VSpan to VMax - VMin
- set MMin to the left of sprite 10 + 11.0
- set MMax to the right of sprite 10 - 13.0
- set MSpan to MMax - MMin
- set VList to []
- set value to VMin - Step
- repeat while value < VMax
- set value to value + Step
- append(VList, integer(value))
- end repeat
- set pixperpos to MSpan / count(VList)
- set gValueMeterL to []
- set K to count(VList)
- repeat with n = 1 to K
- set p to integer(0.48999999999999999 + ((n - 1) * pixperpos))
- repeat with i = p to n * pixperpos
- append(gValueMeterL, getAt(VList, 1))
- end repeat
- deleteAt(VList, 1)
- end repeat
- end
-